package com.ge.healthcare.autosc.ui.assetReg.exceptions;

public class GenericException extends Exception 
{
	
	/**
     * Auto Generated
     */
    private static final long serialVersionUID = 1L;

    /**
     * The variable is used to error type which helps in identifying the base
     * exception that was thrown. We will be required to catch GenericEventException
     * only then we can place a switch block to see the base exception
     */
    protected int errorType = -1;

    /**
     * @param objThrowable
     * @param iErrorType
     */
    public GenericException(Throwable objThrowable, int iErrorType) {
        super(objThrowable);
        this.errorType = iErrorType;
    }

    /**
     * @param strMessage
     * @param objThrowable
     * @param iErrorType
     */
    public GenericException(String strMessage, Throwable objThrowable, int iErrorType) {
        super(strMessage, objThrowable);
        this.errorType = iErrorType;
    }

    /**
     * @param strMessage
     * @param iErrorType
     *            Constructor to set error type along with Error Message
     */
    public GenericException(String strMessage, int iErrorType) {
        super(strMessage);
        this.errorType = iErrorType;
    }

    /**
     * @return error type associated with the Exception
     */
    public int getErrorType() {
        return errorType;
    }

    /**
     * @param errorType
     *            Sets error type of the exception
     */
    public void setErrorType(int errorType) {
        this.errorType = errorType;
    }

}
